#include <state_pattern.h>
#include <iostream>

void StartState::doAction(Context *context)
{
    cout << "Player is in start state" << endl;
    context->setState(this);
}

string StartState::toString()
{
    return "Start State";
}

void StopState::doAction(Context *context)
{
    cout << "Player is in stop state" << endl;
    context->setState(this);
}

string StopState::toString()
{
    return "Stop State";
}

Context::Context()
{
    this->state = nullptr;
}

void Context::setState(State *state)
{
    this->state = state;
}

State* Context::getState()
{
    return this->state;
}
